<!--<button nz-button nzType="primary" (click)="addData()">添加模拟数据</button>-->
<nz-table *ngIf="listOfData.length > 0" nzBordered #basicTable [nzData]="listOfData" nzTableLayout="fixed">
    <thead>
    <tr>
        <th nzWidth="25%">文件名</th>
        <th nzWidth="10%">大小</th>
        <th nzWidth="10%">数量</th>
        <th nzEllipsis nzWidth="45%">位置</th>
        <th nzWidth="10%">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of basicTable.data">
        <td>{{ data.name }}</td>
        <td>{{ data.sizeStr }}</td>
        <td>{{ data.num }}</td>
        <td nzEllipsis>{{ data.path }}</td>
        <td>
            <a nz-button nzType="link" (click)="showDetail(data)">详情</a>
            <nz-divider nzType="vertical"></nz-divider>
            <a nz-button nzType="link" (click)="del(data)">删除</a>
        </td>
    </tr>
    </tbody>
</nz-table>

<nz-modal
        [(nzVisible)]="isVisible"
        (nzOnCancel)="handleCancel()"
        [nzContent]="modalContent"
        [nzFooter]="null"
        nzWidth="70%"
>

    <ng-template #modalContent>
        <nz-descriptions nzTitle="详细内容" nzBordered>
            <nz-descriptions-item nzTitle="文件名称">{{fileModel?.name}}</nz-descriptions-item>
            <nz-descriptions-item nzTitle="文件大小">{{fileModel?.sizeStr}}</nz-descriptions-item>
            <nz-descriptions-item nzTitle="文件重复数量">
                {{fileModel?.num}}
            </nz-descriptions-item>
            <nz-descriptions-item nzTitle="文件MD5" [nzSpan]="2">
                {{fileModel?.md5}}
            </nz-descriptions-item>
        </nz-descriptions>
        <br>
        <!--    <button nz-button nzType="primary" (click)="addMockPath()">添加模拟数据</button>-->
        <div class="filePathList">
            <nz-list nzItemLayout="horizontal">
                <nz-list-item *ngFor="let item of fileModel?.path">
                    <nz-list-item-meta
                            [nzAvatar]=avatar
                            nzDescription="文件位置"
                    >
                        <nz-list-item-meta-title>
                            {{ item }}
                        </nz-list-item-meta-title>
                    </nz-list-item-meta>
                    <ul nz-list-item-actions>
                        <nz-list-item-action><a nz-button nzType="default" nzDanger (click)="delFile(item)">删除</a>
                        </nz-list-item-action>
                    </ul>
                </nz-list-item>
            </nz-list>
        </div>

    </ng-template>

    <ng-template #avatar>
        <span class="fileIcon" nz-icon nzType="file" nzTheme="outline"></span>
    </ng-template>

</nz-modal>
